<template>
  <div class="GanHuoDetail">
<!--    <h1>GanHuoDetail</h1>-->
<!--    <h1>{{ $route.params }}</h1>-->
    <h1>{{ article.title }}</h1>
    <h1>{{ article.desc }}</h1>
    <img :src="article.images && article.images[0]" alt="">
  </div>
</template>

<script>
import axios from "axios";

export default {
  name: "GanHuoDetail",
  data() {
    return {
      article: {}
    }
  },
  created() {
    const {id} = this.$route.params
    axios({
      url: `https://gank.io/api/v2/post/${id}`
    }).then(res => {
      this.article = res.data.data
      // .images[0]
    })
  }
}
</script>

<style scoped>

</style>
